package com.ygxsk.carhome.helper

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.tencent.mm.opensdk.openapi.WXAPIFactory

/*
 * @Author:itchenqi175@163.com
 * @Time:2023-10-18  09:23
 * @Description:微信注册的使用广播注册
 */
class AppRegister : BroadcastReceiver() {
    override fun onReceive(context: Context, intent: Intent) {
        // TODO: This method is called when the BroadcastReceiver is receiving
        // an Intent broadcast.
        //throw new UnsupportedOperationException("Not yet implemented");
        val api = WXAPIFactory.createWXAPI(context, null, false)
        // 将该app注册到微信
        api.registerApp(PushConstants.WEIXIN_APPID)
    }
}